---
title: Allow new rows
---

import siteConfig from '/docusaurus.config.js';

Allow the input of new rows at the bottom of the grid.

<SandpackEditor>

```ts
import canvasDatagrid from 'canvas-datagrid';
import data from '/data.json';

const app = document.getElementById('app');
const gridElement = document.createElement('div');
const grid = canvasDatagrid({
  parentNode: gridElement,
  data,
  showNewRow: true,
});

app.append(gridElement);
```

```json data.json
[{ "col1": "foo", "col2": 0, "col3": "a" }]
```

</SandpackEditor>
